﻿using Admin.NET.Core;
using Admin.NET.Application.Entity;

namespace Admin.NET.Application.SeedData;

/// <summary>
/// 学期 表种子数据
/// </summary>
public class XuenianXueqiSeedData: ISqlSugarEntitySeedData<XuenianXueqi>
{
    /// <summary>
    /// 种子数据
    /// </summary>
    /// <returns></returns>
    public IEnumerable<XuenianXueqi> HasData()
    {
        string recordsJSON = @"
            [
			  {
			    ""Xuenian"": 2023,
			    ""Xueqi"": 1,
			    ""Code"": ""20231"",
			    ""Fullname"": ""2023学年第1学期"",
			    ""StartDate"": ""2023-09-01 00:00:00"",
			    ""IsCurrent"": false,
			    ""IsHidden"": false,
			    ""Beizhu"": null,
			    ""CreateTime"": ""2024-03-19 13:17:51"",
			    ""UpdateTime"": ""2024-09-04 08:00:49"",
			    ""CreateUserId"": 1300000000101,
			    ""CreateUserName"": ""超级管理员"",
			    ""UpdateUserId"": 1300000000101,
			    ""UpdateUserName"": ""超级管理员"",
			    ""IsDelete"": false,
			    ""Id"": 31038240284229
			  },
			  {
			    ""Xuenian"": 2023,
			    ""Xueqi"": 2,
			    ""Code"": ""20232"",
			    ""Fullname"": ""2023学年第2学期"",
			    ""StartDate"": ""2024-02-24 00:00:00"",
			    ""IsCurrent"": false,
			    ""IsHidden"": false,
			    ""Beizhu"": null,
			    ""CreateTime"": ""2024-03-19 17:10:45"",
			    ""UpdateTime"": ""2024-09-04 08:00:45"",
			    ""CreateUserId"": 1300000000101,
			    ""CreateUserName"": ""超级管理员"",
			    ""UpdateUserId"": 1300000000101,
			    ""UpdateUserName"": ""超级管理员"",
			    ""IsDelete"": false,
			    ""Id"": 32940606315077
			  },
			  {
			    ""Xuenian"": 2024,
			    ""Xueqi"": 1,
			    ""Code"": ""20241"",
			    ""Fullname"": ""2024学年第1学期"",
			    ""StartDate"": ""2024-09-02 00:00:00"",
			    ""IsCurrent"": true,
			    ""IsHidden"": false,
			    ""Beizhu"": null,
			    ""CreateTime"": ""2024-09-04 08:01:15"",
			    ""UpdateTime"": ""2024-09-04 08:01:21"",
			    ""CreateUserId"": 1300000000101,
			    ""CreateUserName"": ""超级管理员"",
			    ""UpdateUserId"": 1300000000101,
			    ""UpdateUserName"": ""超级管理员"",
			    ""IsDelete"": false,
			    ""Id"": 36670175576133
			  }
			]
        ";
        List<XuenianXueqi> records = Newtonsoft.Json.JsonConvert.DeserializeObject<List<XuenianXueqi>>(recordsJSON);
        
        // 后处理数据的特殊字段
		//for (int i = 0; i < records.Count; i++) { }

        return records;
    }
}